var windowName = "userOrder";
var Page;
apiready = function(){
    onWindowShow(function () {
        console.log(windowName + " show")
        getData()
    })
    onWindowHide(function () {
        console.log(windowName + " hide")
    })
    console.log("index page is OK");
    Page = createVM("#Page",{
        curTab:0
        ,task:[]
        ,serv:[]
    },{
        //页面方法
        "init":function () {
        }
    })
    Page.init()
}

function getData() {
    apiGet("/app/user/orders",{},function (res , code) {
        Page.task = res.data.task
        Page.serv = res.data.serv
        logJson(code)
        logJson(res)
    })
}